package org.msi.bayesiannetwork;

import java.util.List;

/**
 * <p>Represents the boolean sequence.</p>
 *
 * @author Jakub Narloch
 * @version 1.0
 */
public class BooleanSequence {

    /**
     * <p>Represents the boolean sequence.</p>
     */
    private final List<Boolean> booleanSequence;

    /**
     * <p>Creates new instance of {@link BooleanSequence} class.</p>
     *
     * @param booleanSequence the boolean sequence
     */
    public BooleanSequence(List<Boolean> booleanSequence) {

        // TODO check input
        this.booleanSequence = booleanSequence;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BooleanSequence that = (BooleanSequence) o;

        return booleanSequence.equals(that.booleanSequence);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        return booleanSequence.hashCode();
    }
}
